package com.wfw.gateway.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.codec.ServerCodecConfigurer;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.reactive.DispatcherHandler;

/**
 * Created by yuzhongbo on 2018/9/18.
 */

@Configuration
public class BeanConifg {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
    @Bean
    @LoadBalanced
    public DispatcherHandler dispatcherHandler() {
        return new DispatcherHandler();
    }
//    @Bean
//    @LoadBalanced
//    public ServerCodecConfigurer serverCodecConfigurer() {
//        return new ServerCodecConfigurer();
//    }

}
